package com.byedu.jupiter.controller.course;

import com.byedu.jupiter.domain.course.QuestionDO;
import com.byedu.jupiter.service.course.QuestionService;
import com.byedu.jupiter.util.ZipUtil;
import com.byedu.jupiter.util.enums.CharsetType;
import com.byedu.jupiter.util.enums.FileType;
import com.byedu.jupiter.util.parsers.library.LibraryExcelParser;
import org.apache.commons.fileupload.disk.DiskFileItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by jason on 2017/6/3.
 */
@Controller
@RequestMapping("course")
public class CourseController {
    @Autowired
    private CourseService courseService;


    /**
     * 获取课程列表
     * @param model
     * @return
     */
    @RequestMapping(value = "/list", method = {RequestMethod.GET})
    @ResponseBody
    public String list(ModelMap model) {

        return "course/courselist";
    }

    /**
     * 进入课程添加页面
     * @param model
     * @return
     */
    @RequestMapping(value = "/inputForm", method = {RequestMethod.GET})
    @ResponseBody
    public String inputForm(ModelMap model) {

        return "course/inputForm";
    }

    /**
     * 保存课程信息
     * @param model
     * @return
     */
    @RequestMapping(value = "/saveOrUpdate", method = {RequestMethod.GET})
    @ResponseBody
    public String saveOrUpdate(ModelMap model) {

        return "";
    }

}